import java.text.DecimalFormat;
import java.util.Properties;
import java.util.Random;

import static java.lang.Double.parseDouble;

/**
 * @author 张硕
 * @date 2023/6/18 19:31
 */
public class KafkaProducer {
    Properties properties = new Properties();
    Random rd = new Random();
    //学期 1-8
    int semester = rd.nextInt(8) + 1;
    // 0 1性别
    int gender = rd.nextInt(2);

    String[] birth = new String[]{"20020906", "20020924", "20010820", "20000321", "20010908", "20030219", "20020506", "20020729", "20011125"};
    int bir = rd.nextInt(8);
    String Birth = birth[bir];
    int StudId = rd.nextInt(99) + 2020340701;
    String[] Statue = new String[]{"L", "A"};
    int Stu = rd.nextInt(2);
    String S = Statue[Stu];
    //绩点
    DecimalFormat decimalFormat = new DecimalFormat("0.00");
    double GPA = parseDouble(decimalFormat.format(rd.nextDouble() * 3.0 + 2.0));  //生成[2.0-5.0]区间的小数 保留两位，强制类型转换
    // 品类
}
